package com.runa.monitor.platinterface.mqtt;

import org.springframework.util.StringUtils;

/**
 * 2024/5/15 11:34
 * zhangYB
 */
public class MqttTool {



    public static String getModelFromTopic(String topic) {
        if (StringUtils.isEmpty(topic)) {
            return null;
        }
        if (topic.startsWith("/aigw_mt/")) {
            return "TYMT-AI-RN";
        } else if (topic.startsWith("/aigw_jy/")) {
            return "TYJY-AI-RN";
        } else if (topic.startsWith("/aigw_hmy/")) {
            return "TYHMY-AI-RN";
        } else if (topic.startsWith("/aigw/")) {
            return "RN-ZNGW-01";
        }
        return null;
    }



}
